{set:$seller_id = isset($this->billRow['seller_id']) ? $this->billRow['seller_id'] : 0}

<div class="headbar">
	<div class="position"><span>统计</span><span>></span><span>商户数据统计</span><span>></span><span>货款结算单修改</span></div>
</div>
<style>
.form_content{
	background: white;	
}

.con{
	width: 100%;
	text-align: left;
	height: 1500px;
}

.txt{
	font-size: 16px;
	margin-left:10px;
	margin-top:10px;
	display: inline-block;	
}

font{
	font-size: 16px;
}

.table_content{
	width: 1000px;
	
}
.table_content tr{
	height: 30px;
}

.apply{
	margin-top: 10px;
}

</style>

<?php 
	
	
	$log_arr = json_decode($this->billRow['log'],true);

	$jiesuan_info = $log_arr['data'] ;
	$sum_jiesuan = $log_arr['true_jiesuan'];

	//echo "<pre>";
	//print_r($jiesuan_info);
	//echo "</pre>";
?>

<div class="content_box">
	<div class="content form_content">
		<form action="{url:/market/bill_update}"  method="post" name="bill_edit">
			<input type='hidden' name='id' />
			<input type="hidden" name="seller_id" value="{$seller_id}">
			
			<div class="con">
				<span class="txt">商户名称：</span><font>{query:name=seller where=id eq $seller_id}{$item['seller_name']}{/query}</font><br/>
				<span class="txt">结算货款起止时间：
					<font>
						<input type='text' class="small" name='start_time' pattern='date' alt='开始日期' title="开始日期" disabled="disabled" />
						<input type='text' class="small" name='end_time' pattern='date' alt='结束日期' title="结束日期" disabled="disabled" />
					</font>
				</span>
				<br/>
				<span class="txt">申请结算附言：</span><font><textarea class="apply" name="apply_content" disabled="disabled" ></textarea></font><br/>
				<span class="txt">管理员回复：<font><textarea name="pay_content"></textarea></font> </span><br/>
				<span class="txt">结算信息：
					<font>
						<table border="1" class="table_content">
							<thead>
								<tr >
									<td>订单类型</td>
									<td>订单号</td>
									<td>创建日期</td>
									<td>付款日期</td>
									<td>付款金额</td>
									<td>提成</td>
									<td>结算金额</td>
									<td>退款金额</td>
									<td>实际结算</td>
									<td>详情</td>
								</tr>
							</thead >
							
							<tbody class="t_body">
								{foreach: items = $jiesuan_info }
								<tr >
									<td>{$item['order_type']}</td>
									<td>{$item['no']}</td>
									<td>{$item['create_date']}</td>
									<td>{$item['pay_time']}</td>
									<td>{$item['sum']}</td>
									<td>{$item['tichen']}</td>
									<td>{$item['jiesuan']}</td>
									<td>{$item['refund']}</td>
									<td>{$item['real_Sum']}</td>
									<td><a target="_blank" href="{url:market/orderxq/order_id/$item['no']/jiesuan/$item['jiesuan']/real_sum/$item['real_Sum']/refund/$item['refund']}">详情</a></td>
								</tr>
								{/foreach}
							</tbody>
							
						</table>
					</font>
				</span><br/>
				<span class="txt">结算总额：<font>￥{$sum_jiesuan}</font> </span><br/>
				<span class="txt">是否同意结算：<font><label class="attr"><input type="radio" name="is_pay" value="1" />是</label>
						<label class="attr"><input type="radio" name="is_pay" value="0" />否</label></font> </span><br/>
				<button class="submit" type='submit'><span>确 定</span></button>
						
			</div>
		
			
			<!-- 
			<table class="form_table">
				<colgroup>
					<col width="150px" />
					<col />
				</colgroup>
				<tr>
					<th>商户名称：</th>
					<td>{query:name=seller where=id eq $seller_id}{$item['seller_name']}{/query}</td>
				</tr>
				<tr>
					<th>结算货款起止时间：</th>
					<td>
						<input type='text' class="small" name='start_time' pattern='date' alt='开始日期' title="开始日期" disabled="disabled" />
						<input type='text' class="small" name='end_time' pattern='date' alt='结束日期' title="结束日期" disabled="disabled" />
					</td>
				</tr>
				<tr>
					<th>结算信息：</th>
					<td><textarea name="log" disabled="disabled"></textarea></td>
				</tr>
				<tr>
					<th>申请结算附言：</th>
					<td>
						<textarea name="apply_content" disabled="disabled"></textarea>
					</td>
				</tr>
				<tr>
					<th>管理员回复：</th>
					<td>
						<textarea name="pay_content"></textarea>
					</td>
				</tr>
				<tr>
					<th>是否同意结算：</th>
					<td>
						<label class="attr"><input type="radio" name="is_pay" value="1" />是</label>
						<label class="attr"><input type="radio" name="is_pay" value="0" />否</label>
					</td>
				</tr>
				<tr><th></th><td><button class="submit" type='submit'><span>确 定</span></button></td></tr>
			</table>
			 -->
			
		</form>
	</div>
</div>

<script type="text/javascript">
//表单回填
var formObj = new Form('bill_edit');
formObj.init({echo:JSON::encode($this->billRow)});
</script>